Grams to Moles Conversion Calculator

ByHarmain Manzoor

Last updated July 9, 2026

Grams to Moles Conversion Calculator banner by 360Calculator for calculating moles from grams using molecular weight.
Convert mass in grams to moles instantly with this free online chemistry conversion calculator.

A grams to moles conversion calculator converts a measured mass into an amount of substance, expressed in moles, using the molar mass of the material, and it also works in reverse to turn a mole value back into grams. Chemistry students, lab technicians, and anyone preparing a reaction or a solution use this conversion to move between a number a balance can measure and a number a chemical equation can use. A balance only reports mass, but chemical reactions happen atom by atom and molecule by molecule, so mass has to be translated into a particle-based amount before a reaction can be planned or scaled. Below, you'll find how molar mass works, how to use the calculator, worked examples with real compounds, and the mistakes that most often produce a wrong answer.

What Is the Formula for Converting Grams to Moles?

Moles equal mass divided by molar mass, written as n = m / M. m is mass in grams, n is moles, and M is molar mass in grams per mole (g/mol). Molar mass sits in the denominator because it describes how much mass a single mole of that specific substance carries, so dividing total mass by that per-mole figure leaves the count of moles present. This relationship can also be written as a ratio and proportion, setting the known mass over its unknown mole count equal to the molar mass over 1 mole, then cross-multiplying to solve for moles, a format used in several standard chemistry teaching references alongside the direct division method.

Variable

Meaning

Unit

m

Mass

Grams (g)

n

Moles

Moles (mol)

M

Molar mass

Grams per mole (g/mol)

 

What Do Mass, Moles, and Molar Mass Mean in the Formula?

Mass is what a balance measures, expressed in grams, and it describes how heavy a sample is without saying anything about how many particles make up that sample. Moles is the amount of substance, a counting unit for atoms, ions, or molecules, in the same way that a dozen is a counting unit for eggs, except one mole represents a vastly larger count of particles. Molar mass is the mass of one mole of a specific substance, expressed in g/mol, and it acts as the conversion bridge between the mass a balance reports and the particle count a reaction actually depends on.

Is 1 Gram Equal to 1 Mole?

No, 1 gram is never equal to 1 mole, since a gram is a fixed unit of mass while a mole is a fixed count of particles, and the two only line up numerically for a substance whose molar mass happens to equal exactly 1 g/mol. No real substance has a molar mass of exactly 1 g/mol. Hydrogen, the lightest element on the periodic table, still has a molar mass of about 1.008 g/mol, so even a full gram of hydrogen gas contains slightly less than one mole of hydrogen atoms. Carbon, by comparison, has a molar mass of about 12.011 g/mol, so 1 gram of carbon contains only about 0.083 moles, far less than a full mole, which shows how quickly the gram-to-mole relationship changes as molar mass increases.

How Do You Rearrange the Formula to Convert Moles to Grams?

The same formula rearranges to m = n Γ— M when moles are known and grams are needed, since multiplying both sides of n = m / M by M isolates mass on its own. This is the same relationship solved for a different variable, not a separate formula, so the same molar mass value from the original calculation carries over directly. 2.5 moles of sodium chloride (NaCl), at a molar mass of about 58.44 g/mol, converts to about 146.1 grams, since 2.5 Γ— 58.44 = 146.1.

How Do You Calculate Molar Mass for the Formula?

Molar mass comes from adding atomic weights from the periodic table based on a compound's chemical formula, multiplying each atomic weight by its subscript count first, then summing every atom's contribution into one total. This method scales from a single element up to compounds with several different atoms and even to compounds that include water molecules bound inside their structure. The examples below carry this general method through specific worked cases, from a single atomic weight lookup to a full multi-atom compound and a hydrate.

How Do You Find Atomic Weights on the Periodic Table?

Every element's periodic table entry lists a standard atomic weight in g/mol, and this is the starting number for any molar mass calculation. An element's atomic weight and its molar mass are numerically the same value, so the number printed under an element's symbol can be used directly once it is multiplied by however many atoms of that element appear in the formula. Atomic weights are reported as decimal values rather than whole numbers because they represent a weighted average across a naturally occurring mix of isotopes for that element, not the mass of a single idealized atom. The International Union of Pure and Applied Chemistry maintains the standard atomic weight values printed on modern periodic tables, and these values are periodically reviewed and updated as measurement precision improves.

How Do You Calculate Molar Mass for a Compound With Multiple Atoms?

Multiply each element's atomic weight by its subscript count, then add every atom's contribution together, including atoms inside parentheses such as in Ca(OH)2, where the subscript outside the parentheses multiplies every atom inside it. Carbon dioxide (CO2) has a molar mass of 44.0 g/mol, from one carbon at 12.0 g/mol plus two oxygens at 16.0 g/mol each.

Atom

Count

Atomic Weight (g/mol)

Subtotal (g/mol)

C

1

12.0

12.0

O

2

16.0

32.0

Total

-

-

44.0

 

The same method scales up to larger molecules with more atom types. Glucose (C6H12O6) has a molar mass of about 180.16 g/mol, from 6 carbons at 12.011 g/mol, 12 hydrogens at 1.008 g/mol, and 6 oxygens at 16.00 g/mol, all added together.

Atom

Count

Atomic Weight (g/mol)

Subtotal (g/mol)

C

6

12.011

72.07

H

12

1.008

12.10

O

6

16.00

96.00

Total

-

-

180.16

 

How Do You Calculate Molar Mass for a Hydrate?

A hydrate's molar mass adds the mass of its water molecules on top of the base compound's mass, since the middle dot in a formula such as CoSO4β€’6H2O signals that 6 whole water molecules are bound into the crystal structure alongside the base compound. Cobalt(II) sulfate hexahydrate (CoSO4β€’6H2O) adds six water molecules, each at 18.015 g/mol, on top of the CoSO4 mass of about 154.99 g/mol, for a total molar mass of about 263.1 g/mol.

Component

Molar Mass (g/mol)

CoSO4 (base compound)

154.99

6 Γ— H2O

108.09

Total (hydrate)

263.1

 

Copper(II) sulfate pentahydrate (CuSO4β€’5H2O) follows the same pattern with a different atom count, adding 5 water molecules to a CuSO4 base mass of about 159.61 g/mol for a total of about 249.69 g/mol. Both examples show that the number before H2O in a hydrate formula is simply another atom count to multiply and add, following the exact same process as any other subscript in the formula.

How Do You Use the Grams to Moles Calculator Step by Step?

Follow these 3 steps to get a mole result from the calculator above.

1.       Enter the mass in grams. If the original value is in another unit, convert it to grams first, as shown in the unit conversion section below.

2.       Enter the molar mass directly if it is already known, or enter a chemical formula so the calculator generates the molar mass automatically from atomic weights.

3.       Read the mole result, along with the molar mass breakdown the calculator displays, which lists each atom's contribution so the total can be checked against a manual calculation.

What Values Do You Need to Enter Into the Calculator?

The calculator needs a mass in grams, plus either a molar mass value or a chemical formula. Only 2 of mass, moles, and molar mass need to be entered, since the calculator solves for the third automatically, the same logic that lets the tool run the moles to grams direction just as easily as the grams to moles direction.

How Do You Enter a Chemical Formula Correctly?

Enter element symbols, numeric subscripts, and parentheses for grouped atoms exactly as the formula is written on paper, such as Ca(OH)2 for calcium hydroxide or (NH4)2SO4 for ammonium sulfate. The calculator reads the formula the same way it would appear in a textbook, multiplying any subscript that follows a closing parenthesis across every atom inside that group. A formula entered without a closing parenthesis, or with a subscript placed before rather than after an element symbol, produces an incorrect molar mass, so the notation should match standard chemical formula formatting exactly.

Why Does Letter Case Matter When Entering a Formula?

Letter case changes which element a symbol represents, since the first letter is always uppercase and any second letter is always lowercase. Co represents cobalt at 58.93 g/mol, while CO represents carbon monoxide at 28.01 g/mol, two entirely different molar mass results from the same 2 letters typed in a different case. Hf represents hafnium at 178.49 g/mol, while HF represents hydrogen fluoride at about 20.01 g/mol, the same letters again producing two unrelated results depending on capitalization.

What If Your Mass Is in a Different Unit Like Milligrams or Kilograms?

Convert the given mass into grams before dividing by molar mass, since the formula requires mass in grams. The same conversion applies in reverse if the mole answer needs to be reported in millimoles or micromoles instead of moles.

From Unit

Convert to Grams

Micrograms (mcg)

Divide by 1,000,000

Milligrams (mg)

Divide by 1,000

Kilograms (kg)

Multiply by 1,000

 

250 milligrams of sodium hydroxide (NaOH), at a molar mass of about 40.00 g/mol, first converts to 0.250 grams, since 250 divided by 1000 equals 0.250. Dividing 0.250 grams by 40.00 g/mol gives 0.00625 moles, which can also be reported as 6.25 millimoles by multiplying the mole value by 1000.

What If You Have a Volume Instead of a Mass?

Convert the volume to a mass using the substance's density before applying the grams to moles formula, since density provides the mass-per-volume figure needed to bridge a liquid measurement into the same mass-based formula used throughout this guide. 6 liters of water at a density of 998 kilograms per cubic meter converts to about 5988 grams, the mass figure that then gets divided by water's molar mass of 18.015 g/mol to reach about 332.4 moles. This 2-step path, volume to mass and then mass to moles, applies to any liquid reagent as long as its density at the working temperature is known.

What Is a Worked Example of Converting Grams to Moles?

The two examples below apply the full grams to moles method to real mass values: one for water, a compound made of just two elements, and one for potassium permanganate, a compound made of three different elements, so both a simple case and a slightly more involved one are covered.

How Many Moles Are in a Given Mass of Water?

100 grams of water equals about 5.551 moles. Water's molar mass is about 18.015 g/mol, and 100 divided by 18.015 gives 5.551. Multiplying the result back out, 5.551 moles Γ— 18.015 g/mol, returns almost exactly 100.0 grams, a quick check that confirms the division was set up correctly.

Mass (g)

Molar Mass (g/mol)

Moles

100

18.015

5.551

 

How Many Moles Are in a Given Mass of a Compound Like KMnO4?

25.0 grams of potassium permanganate (KMnO4) equals about 0.158 moles. Its molar mass builds up to about 158.032 g/mol from potassium, manganese, and 4 oxygens, and 25.0 divided by 158.032 gives 0.158. Checking the result in reverse, 0.158 moles Γ— 158.032 g/mol, returns approximately 25.0 grams, confirming the calculation.

Atom

Count

Atomic Weight (g/mol)

Subtotal (g/mol)

K

1

39.10

39.10

Mn

1

54.94

54.94

O

4

16.00

64.00

Total

-

-

158.032

 

Mass (g)

Molar Mass (g/mol)

Moles

25.0

158.032

0.158

 

What Common Mistakes Cause Wrong Answers in Grams to Moles Conversion?

There are 4 recurring error patterns in grams to moles conversion, each traceable to a specific step in the process.

1.       A wrong molar mass from a miscounted formula, such as forgetting that the subscript 2 in Ca(OH)2 multiplies both the oxygen and the hydrogen inside the parentheses, not just the oxygen.

2.       Incorrect rounding, covered in detail in the significant figures section below.

3.       Mixed up units, such as dividing a milligram value directly by molar mass without first converting to grams, which produces an answer 1000 times too small.

4.       Confusing moles with molecules, such as treating a calculated mole value as if it were already a particle count, skipping the separate Avogadro's number step covered further down.

The two sections below expand on the most common of these errors, rounding and unit cancellation, in full detail.

How Do Significant Figures Affect the Final Answer?

The mole answer should be rounded to match the significant figures of the least precise given value. A result rounds to 3 significant figures when the original mass value had 3 significant figures, following standard measurement rounding convention recommended by the National Institute of Standards and Technology. 12.50 grams of glucose, a value with 4 significant figures, divided by a molar mass of 180.16 g/mol, a value with 5 significant figures, gives an unrounded result of 0.069382 moles, which should be reported as 0.06938 moles to match the 4 significant figures of the original mass.

Step

Value

Significant Figures

Given mass

12.50 g

4

Molar mass

180.16 g/mol

5

Unrounded result

0.069382 mol

-

Correctly rounded result

0.06938 mol

4

 

Why Do Unit Cancellation Errors Happen?

Unit cancellation errors happen when the numerator and denominator get mixed up, or when units get dropped mid-calculation, leaving no way to check whether the setup was correct before arriving at a final number. Writing g and g/mol clearly in the setup lets grams cancel out and leaves mol, which catches a setup mistake before the calculation finishes. 12.0 grams of CO2 multiplied by 1 mole of CO2 over 44.0 grams of CO2 cancels the gram units directly, leaving 0.273 moles of CO2 as the final unit, a structure that would immediately look wrong if the molar mass had been placed in the numerator instead.

Where Does Grams to Moles Conversion Fit Within Broader Mole Calculations?

Grams to moles conversion is usually the first step before finding molarity, running a stoichiometry problem, counting molecules, working from a gas measurement, or comparing mole fractions and mole percentages. Each one builds on the mole value calculated here, and there's a dedicated calculator for every next step, so this section just introduces why each matters rather than the full method behind it.

Moles to Grams

The same formula rearranges to m = n Γ— M, a common need when a lab procedure specifies moles but the substance must be weighed out in grams. 0.5 moles of sodium chloride, for example, converts to about 29.22 grams on a lab balance. If you're starting from moles instead of grams, the Moles to Grams Calculator walks through this reverse direction with its own set of worked examples.

Molar Mass on Its Own

Molar mass comes from atomic weights and the chemical formula alone, so it can be calculated even without a mass value on hand, such as when checking a reagent label. Citric acid (C6H8O7), for instance, has a molar mass of about 192.12 g/mol, a figure worth confirming directly against a reagent bottle before starting any calculation. For formulas that involve complex ions or hydrates, the Molar Mass Calculator handles those without needing a mass value at all.

Moles to Molecules or Atoms

Multiplying moles by Avogadro's number, about 6.022 Γ— 10^23, gives the particle count represented by that mole value. 0.5 moles of any substance represents about 3.011 Γ— 10^23 individual particles. To take a mole value all the way down to an actual particle count, the Moles to Molecules / Avogadro's Number Calculator breaks that step down separately.

Molarity From Moles

Molarity equals moles divided by liters of solution, the natural next step once a mole value applies to a liquid rather than a solid. 0.5 moles of a solute dissolved into 2 liters of solution gives a concentration of 0.25 moles per liter. The Molarity Calculator picks up from here with the full concentration calculation.

Mole Ratios in Stoichiometry

A balanced chemical equation gives the mole ratio between reactants and products, applied right after the grams to moles step covered above. In the reaction 2H2 + O2 β†’ 2H2O, every 2 moles of hydrogen gas react with 1 mole of oxygen gas, a ratio read directly from the equation's coefficients. Once you have a mole value in hand, the Stoichiometry Calculator carries it into a complete reaction calculation.

Preparing a Dilution

Dilution uses the relationship between starting and target concentration and volume, with moles staying constant while concentration changes. Diluting a 2 mol/L stock solution down to 0.5 mol/L requires increasing the total volume by a factor of 4, since the same number of moles now occupies 4 times as much liquid. Need to prepare a target concentration from a stock solution? The Dilution Calculator covers exactly that.

Moles From Gas Volume, Pressure, and Temperature

For a gas sample without a direct mass value, n = PV / RT gives moles from pressure, volume, and temperature, a separate route to the same n value covered above. At standard temperature and pressure, 1 mole of an ideal gas occupies about 22.4 liters, a reference figure that often shortcuts the full gas law calculation for simple cases. For gas-based problems specifically, the Ideal Gas Law / Gas Stoichiometry Calculator walks through this route in detail.

Mole Fraction

Mole fraction equals the moles of one component divided by the total moles of all components in a mixture, a common next step once individual mole values are known. 2 moles of solute mixed with 6 moles of solvent gives a total of 8 moles, so the solute's mole fraction is 0.25. Working with a mixture of two or more substances? The Mole Fraction Calculator covers that ratio.

Weight Percent to Mole Percent

Each component's weight percent gets divided by its molar mass, then each result gets divided by the sum of all results and multiplied by 100 to get mole percent. A mixture listed as 40 percent NaOH by weight goes through this same 3-step process once every other component in the blend has been divided by its own molar mass and normalized against the total. If your mixture is given as percentages rather than raw amounts, such as an oxide blend, the Weight Percent to Mole Percent Calculator handles that conversion.



Leave Your Feedback

Help us improve this calculator

Rating

Recent Feedback

No feedback yet.